package tool

import "strings"

type CronTab struct {
	Second     string
	Minute     string
	Hour       string
	DayOfMonth string
	Month      string
	Week       string
	Year       string
}

func CronDecode(s string) {

	var cronTab CronTab
	items := strings.Split(s, " ")
	if len(items) != 7 {
		return
	}
	cronTab.Second = items[0]
	cronTab.Minute = items[1]
	cronTab.Hour = items[2]
	cronTab.DayOfMonth = items[3]
	cronTab.Month = items[4]
	cronTab.Week = items[5]
	cronTab.Year = items[6]
	return
}
